﻿#pragma once
#include "Comm.h"

#ifdef __GNUC__
typedef void* HMODULE;
#endif

namespace COMM
{
	class COMM_API CommLibrary
	{
	public:
		CommLibrary(const char* szLibraryPath);
		~CommLibrary();

		bool IsValid();
		void* GetProcAddress(const char* funcname);

	private:
		HMODULE OpenLibrary(const char* libPath);
		void CloseLibrary();
	private:
		HMODULE hlib;
	};
}